Rel Attribute
   HOME

TheInfoList



OR:

A link relation is a descriptive attribute attached to a
hyperlink In computing, a hyperlink, or simply a link, is a digital reference to data that the user can follow or be guided by clicking or tapping. A hyperlink points to a whole document or to a specific element within a document. Hypertext is text wit ...
in order to define the type of the link, or the relationship between the source and destination resources. The attribute can be used by automated systems, or can be presented to a user in a different way. In
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
these are designated with the attribute on , , or elements. Example uses include the standard way of referencing
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
, , which indicates that the external resource linked to with the attribute is a stylesheet, so a
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
will generally fetch this file to render the page. Another example is for the popular
favicon A favicon (; short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a file containing one or more small icons, associated with a particular website or web page. A web designer can create s ...
icon. Link relations are used in some
microformat Microformats (μF) are a set of defined HTML classes created to serve as consistent and descriptive metadata about an element, designating it as representing a certain type of data (such as contact information, geographic coordinates, events ...
s (e.g. for tagging), in
XHTML Friends Network XHTML Friends Network (XFN) is an HTML microformat developed by Global Multimedia Protocols Group that provides a simple way to represent human relationships using links. XFN enables web authors to indicate relationships to the people in their blog ...
(XFN), and in the Atom standard, in
XLink XML Linking Language, or XLink, is an XML markup language and W3C specification that provides methods for creating internal and external links within XML documents, and associating metadata with those links. The XLink specification XLink 1.1 is a ...
, as well as in HTML. Standardized link relations are one of the foundations of
HATEOAS Hypermedia as the Engine of Application State (HATEOAS) is a constraint of the REST application architecture that distinguishes it from other network application architectures. With HATEOAS, a client interacts with a network application whose app ...
as they allow the user agent to understand the meaning of the available state transitions in a
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and entert ...
system. The
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
(IETF) has a registry of standardized link relations,IANA link relations registry
/ref> and a procedure for extending it defined in RFC 5988.
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
also defines valid link relations.HTML Living Standard; 4.12.4 Link types
Web Hypertext Application Technology Working Group
In HTML4, the rev attribute of a link is also defined, which defines the reversed relationship between the resources. The attribute is removed in
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
.


Semantic Web implementation

The RDF typed links are fundamental in LOD datasets for identifying the relationship (predicate) type of RDF triples, contributing to the automatic processability of machine-readable statements of the
Giant Global Graph Giant Global Graph (GGG) is a name coined in 2007 by Tim Berners-Lee to help distinguish between the nature and significance of the content on the existing World Wide Web and that of a promulgated next-generation web, presumptively named Web 3.0. ...
on the Semantic Web. The typed links in RDF are expressed as the value of the rdf:type property, defining the relationship type using well-established
controlled vocabulary Control may refer to: Basic meanings Economics and business * Control (management), an element of management * Control, an element of management accounting * Comptroller (or controller), a senior financial officer in an organization * Controlling ...
terms or definitions from LOD datasets such as


References


External links


rel values defined in HTML 4rel values to be defined in HTML5rel values which are defined in some specificationWHATWG blog entry on link relations
HTML {{web-stub